from django.urls import path
from .views import *

urlpatterns = [
    # 后台首页视图函数
    path('', IndexViews.index, name="myadmin_index"),
    # 后台登录
    path('login', IndexViews.mylogin, name="myadmin_login"),
    path('dologin', IndexViews.mydologin, name="myadmin_dologin"),
    path('yzm', IndexViews.verifycode, name="myadmin_yzm"),

    # 后台用户管理
    path('users/index', UsersViews.index, name="myadmin_users_index"),
    path('users/add', UsersViews.add, name="myadmin_users_add"),
    path('users/insert', UsersViews.insert, name="myadmin_users_insert"),
    path('users/delete', UsersViews.delete, name="myadmin_users_delete"),

    # 后台图书分类管理
    path('types/index', TypesViews.index, name="myadmin_types_index"),
    path('types/add', TypesViews.add, name="myadmin_types_add"),
    path('types/insert', TypesViews.insert, name="myadmin_types_insert"),
    path('types/delete', TypesViews.delete, name="myadmin_types_delete"),
    path('types/edit', TypesViews.edit, name="myadmin_types_edit"),

    # 后台图书商品管理
    path('books/index', BooksViews.index, name="myadmin_books_index"),
    path('books/add', BooksViews.add, name="myadmin_books_add"),
    path('books/insert', BooksViews.insert, name="myadmin_books_insert"),
    path('books/delete', BooksViews.delete, name="myadmin_books_delete"),
    path('books/edit', BooksViews.edit, name="myadmin_books_edit"),

    # 后台订单管理
    path('orders/index', OrdersViews.index, name="myadmin_orders_index"),
]
